using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Sys;
using SqlSugar;

namespace FytSoa.Domain.Crm;

/// <summary>
/// 公告表
/// </summary>
[SugarTable("crm_notice")]
public class CrmNotice:Entity
{
    /// <summary>
    /// 公告分类
    /// </summary>
    [Required]
    public long CategoryId { get; set; }
    
    /// <summary>
    /// 分类
    /// </summary>
    [Navigate(NavigateType.OneToOne, nameof(CategoryId))]
    public SysCode Category { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; }

    /// <summary>
    /// 展示开始时间
    /// </summary>
    [Required]
    public DateTime StartTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 展示结束时间
    /// </summary>
    [Required]
    public DateTime EndTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public bool Status { get; set; } = true;

    /// <summary>
    /// 内容
    /// </summary>
    [Required]
    [StringLength(0)]
    public string Content { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}